<?php
class user_localrecordlist_getTable implements t3lib_localRecordListGetTableHook {
	public function getDBlistQuery($table, $pageId, &$additionalWhereClause, &$selectedFieldsList, &$parentObject) {
		// Custom button list positionnable
		if ($GLOBALS['SOBE']->modTSconfig['properties']['customButtonList']) {
			$tmpArray = array();
			if ($pos = $GLOBALS['SOBE']->modTSconfig['properties']['customButtonListPos']) {
				$tmpArray[0] = array_slice($parentObject->fieldArray, 0, $pos);
				$tmpArray[2] = array_slice($parentObject->fieldArray, $pos);
			} else $tmpArray[0] = $parentObject->fieldArray;
			$tmpArray[1] = array(0=> '_CUSTOMBUTTONLIST_');
			ksort($tmpArray);
			$parentObject->fieldArray = array_merge($tmpArray[0], $tmpArray[1]);
			if ($tmpArray[2])
				$parentObject->fieldArray = array_merge($parentObject->fieldArray, $tmpArray[2]);
		}
	}
}

require_once (PATH_typo3.'interfaces/interface.localrecordlist_actionsHook.php');
class user_localrecordlist_actions implements localRecordList_actionsHook {
	public function makeClip($table, $row, $cells, &$parentObject){
		return $cells;
	}
	public function makeControl($table, $row, $cells, &$parentObject){
		return $cells;
	}
	public function renderListHeader($table, $currentIdList, $headerColumns, &$parentObject){
		if ($headerColumns['_CUSTOMBUTTONLIST_'])
			$headerColumns['_CUSTOMBUTTONLIST_']='';
		return $headerColumns;
	}
	public function renderListHeaderActions($table, $currentIdList, $cells, &$parentObject){
		return $cells;
	}
}


if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/cmd_api/res/cbl/class.user_localrecordlist.php'])	{
	include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/cmd_api/res/cbl/class.user_localrecordlist.php']);
}
?>